﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Admin.Master" Inherits="System.Web.Mvc.ViewPage<ThietBiSo.LinQDB.FormLienHe>" %>

<%@ Import Namespace="ThietBiSo.LinQDB" %>
<%@ Import Namespace="ThietBiSo.Models" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Website - bảng điều khiển
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <%
        string v = (string)ViewData["lienhes"];
    %>
    <div>
   <p style="background-color:#348AB7; color:White; font-weight:bold;font-size:20px; font-family:Times New Roman">Nội dung liên hệ</p>
        <% using (Html.BeginForm("lienhe", "lienhe", FormMethod.Post, new { @enctype = "multipart/form-data" }))
           { %>
        <%: Html.ValidationSummary(true)%>
        <table width="100%" cellpadding="2" cellspacing="0" border="0">
            <tr>
                <td>
                    <input type="submit" value="Lưu" class="btn" />
                </td>
            </tr>
            <tr>
                <td>
                    <%= Html.TextArea("ChiTiet", System.Net.WebUtility.HtmlDecode(v))%>
                </td>
            </tr>
        </table>
        <script type="text/javascript">

            CKEDITOR.replace('ChiTiet',
             {
                 htmlEncodeOutput: true,
                 enterMode: CKEDITOR.ENTER_BR,
                 filebrowserImageBrowseUrl: '/ckfinder/ckfinder.html?type=Images',
                 filebrowserImageUploadUrl: '/ckfinder/core/connector/aspx/connector.aspx?command=QuickUpload&type=Images'
             });
          
        </script>
        <%} %>
    </div>
  <div style="margin-bottom:20px;">
      <p style="background-color:#348AB7; color:White; font-weight:bold;font-size:20px;font-family:Times New Roman">Từ khách hàng</p>
        <table width="100%" cellpadding="2" cellspacing="0" border="0">
            <tr>
                <td colspan="2">
                    <table id="bang_admin" class="tbl colorize" width="100%" border="0">
                        <tbody>
                            <tr>
                                <th>
                                    Người gủi
                                </th>
                                <th align="center">
                                    Điện thoại
                                </th>
                                <th align="center">
                                    Email
                                </th>
                                <th align="center">
                                    Địa chỉ
                                </th>
                                <th align="center" width="300px">
                                    Nội dung
                                </th>
                                <th align="right" width="30">
                                    Xóa
                                </th>
                            </tr>
                        </tbody>
                        <tbody>
                            <% foreach (FormLienHe dh in (List<FormLienHe>)ViewData["formlienhes"])
                               {               
                            %>
                            <tr class="tb_hienthi">
                                <td>
                                    <%:dh.HoTen %>
                                </td>
                                <td>
                                    <%:dh.SoDienThoai %>
                                </td>
                                <td>
                                    <%:dh.Email %>
                                </td>
                                <td>
                                    <%:dh.DiaChi %>
                                </td>
                                <td>
                                    <%:dh.NoiDung %>
                                </td>
                                <td align="center">
                                    <a href="javascript:FormLienHe_Delete(<%:dh.Id %>);">
                                        <img src="../../Content/imagesAdmin/images/pic_trash.gif" alt="" /></a>
                                </td>
                            </tr>
                            <% } %>
                        </tbody>
                    </table>
                </td>
            </tr>
        </table>
    </div>
</asp:Content>
